// @ts-ignore
/* eslint-disable */
import request from '@/services/request';

/** 列表查询 GET /v1/admin/users */
export async function userV1AdminControllerIndex(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.UserV1AdminControllerIndexParams,
  options?: { [key: string]: any },
) {
  return request<{ total: number; list: API.UserAdminIndexResult[] }>('/v1/admin/users', {
    method: 'GET',
    params: {
      // pageIndex has a default value: 1
      pageIndex: '1',
      // pageSize has a default value: 10
      pageSize: '10',

      ...params,
    },
    ...(options || {}),
  });
}

/** 修改 PATCH /v1/admin/users/${param0} */
export async function userV1AdminControllerUpdate(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.UserV1AdminControllerUpdateParams,
  body: API.UserAdminUpdateDto,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<any>(`/v1/admin/users/${param0}`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}
